{{ if or .PrevInSection .NextInSection }}
  <div
    class="-mx-2 mt-4 flex flex-col border-t px-2 pt-4 md:flex-row md:justify-between"
  >
    <div>
      {{ with .NextInSection }}
        <span class="text-primary-text block font-bold"
          >{{ i18n "previous" }}</span
        >
        <a href="{{ .Permalink }}" class="block">{{ .LinkTitle }}</a>
      {{ end }}
    </div>
    <div class="mt-4 md:mt-0 md:text-right">
      {{ with .PrevInSection }}
        <span class="text-primary-text block font-bold">{{ i18n "next" }}</span>
        <a href="{{ .Permalink }}" class="block">{{ .LinkTitle }}</a>
      {{ end }}
    </div>
  </div>
{{ end }}
